From e0a992af735348110c07e4ba4cefa75de26e3c81 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20M=C3=BCllner?= Date: Fri, 23 Nov 2018 17:57:59 +0100 Subject: [PATCH] notificationDaemon: Fix warning Since commit 33b8537bf5, we unconditionally access the 'image-path' hint, resulting in a gjs warning if the hint is not defined. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/309 --- js/ui/notificationDaemon.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index b897b8a71..0e5f8fcc2 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -77,8 +77,10 @@ var FdoNotificationDaemon = new Lang.Class({ bitsPerSample, nChannels, data] = hints['image-data']; return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha, bitsPerSample, width, height, rowStride); + } else if (hints['image-path']) { + return this._iconForNotificationData(hints['image-path']; } - return this._iconForNotificationData(hints['image-path']); + return null; }, _fallbackIconForNotificationData(hints) { -- 2.39.5